﻿using System;
using System.Runtime.Serialization;

namespace PH.Model.Achievements
{
    [DataContract]
    public class ArchiveModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public Guid Guid { get; set; }
        [Model]
        [DataMember]
        public string Title { get; set; }
        [Model]
        [DataMember]
        public string Description { get; set; }
        [Model]
        [DataMember]
        public Nullable<System.DateTime> BeginTime { get; set; }
        [Model]
        [DataMember]
        public Nullable<System.DateTime> EndTime { get; set; }
        [Model]
        [DataMember]
        public byte AType { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public Nullable<System.DateTime> CreatedOn { get; set; }
        [Model]
        [DataMember]
        public byte ArchiveStatus { get; set; }
        [Model]
        [DataMember]
        public int? BureauID { get; set; }
        [Model]
        [DataMember]
        public Nullable<int> SchoolID { get; set; }

        #region Help
        public SchoolInArchiveCollection JoinSchools { get; set; }
        [DataMember]
        public int MarkCount {get;set;}
        [DataMember]
        public MarkCollection  Marks { get; set; }
        #endregion
    }
    [DataContract]
    public class ArchiveCollection : ModelCollectionBase<ArchiveModel> { }

    public class ArchiveQuery : QueryBase
    {
        public Guid BureauGuid { get; set; }
        public Guid SchoolGuid { get; set; }

        public byte AType { get; set; }
        public int BureauID { get; set; }
        public int SchoolID { get; set; }

        public bool GetMarkCount { get; set; }
        public bool? Expired { get; set; }
    }
}
